package com.mpsc.flowable.modeler;

import org.flowable.ui.modeler.properties.FlowableModelerAppProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;


@SpringBootApplication(exclude = {
        SecurityAutoConfiguration.class,
        ManagementWebSecurityAutoConfiguration.class})
@EnableConfigurationProperties//({FlowableModelerAppProperties.class})
@ComponentScan(basePackages = {
        "com.mpsc.flowable",
        "org.flowable.ui.*",
})
//@ComponentScan(basePackages = {
//        "com.mpsc.flowable",
//        "org.flowable.ui.*",
//},excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,value = {DeployController.class})})
public class MpscFlowableModeler {
    public static void main(String[] args) {
        SpringApplication.run(MpscFlowableModeler.class, args);
    }

    @Bean
    public FlowableModelerAppProperties flowableModelerAppProperties(){
        FlowableModelerAppProperties flowableModelerAppProperties = new FlowableModelerAppProperties();
        return flowableModelerAppProperties;
    }
}
